package nz.net.pole.util;

/**
 * An exception used to indicate that an illegal identity integer has been passed to a method accepting only valid
 * identity integers.
 *
 * @author James Pole (james@pole.net.nz)
 */
public class IllegalIdentityException extends IllegalArgumentException {

    /**
     * Creates an instance with the given invalid identity. It will automatically generate the exception message "<i>The
     * identity #<b>$proposedIdentity</b> was not valid because it was not a postitive integer greater than zero.</i>".
     *
     * @param proposedIdentity The identity that was proposed.
     */
    public IllegalIdentityException(int proposedIdentity) {

        super("The identity #" + proposedIdentity + " was not valid because it was not a positive integer greater than zero.");

    }
}
